////zyemr.bindPatientID('<%=PatientID%>');


$('#zyemrMainLayout').tabs({    
    border:false,    
    onSelect:function(title){    
       ///alert(title+' is selected');  


     // 更新选择的面板的新标题和内容


     	///debugger:


        var tab = $('#zyemrMainLayout').tabs('getSelected');  // 获取选择的面板

        var index = $('#zyemrMainLayout').tabs('getTabIndex',tab);
        var strPatientID = '1234567';////zyemr.getPatientID()；

        ///alert(index);


        if (index == 0 ){//病历修改

        	var strurl = '/ZYEMR/pcaseWrite?PatientID=' + strPatientID;
        	$('#zyemrMainLayout').tabs('update', {
            	tab: tab,
            	options: {
            		///title: '新标题',


            		///href: 'login.jsp', // 新内容的URL


            		content:'<iframe name="blxgtab" scrolling="auto" frameborder="0" style="width:100%;height:100%;"></iframe>'
            	}
            });
    		window.open(strurl, "blxgtab");
        } else if (index == 1 ){
        	var strurl = '/ZYEMR/pcaseView?PatientID=' + strPatientID;
        	$('#zyemrMainLayout').tabs('update', {
            	tab: tab,
            	options: {
            		///title: '新标题',


            		///href: 'login.jsp', // 新内容的URL


            		content:'<iframe name="blsytab" scrolling="auto" frameborder="0" style="width:100%;height:100%;"></iframe>'
            	}
            });
    		window.open(strurl, "blsytab");
        }       
        
        ///return false;          


    }    
});